import request from "@/utils/request";


// 角色列表
export const getuserList = () => {
  return request.get('/roles',)
}
// 权限列表
export const getqxList = () => {
  return request.get('/rights/list',)
}
//获取-权限列表-树形结构
export const getqxListshu = () => {
  return request.get('/rights/tree',)
}
//角色分配-权限点
export const getqx = (id, data) => {
  return request.post('/roles/' + id + '/rights', data)
}
//删除
export const delrolesApi = (id, id2) => {
  return request.delete(`/roles/${id}/rights/${id2}`)
}
//添加角色
export const adduser = (data) => {
  return request.post('/roles', data)
}
//删除角色
export const deluser = (id) => {
  return request.delete('/roles/' + id)
}
// 编辑提交角色
export const bjuser = (data) => {
  return request.put('/roles/' + data.id, data)
}
